package java69.work720;

public class Dog extends Pet  {
    public Dog() {
    }
    public String lookHome(){
       return "正在看家";
    }

    public Dog(String name, int age, String color, int legs) {
        super(name, age, color, legs);
    }
    public void action(){
        super.setName("小黑");
        super.setColor("黑色");
        super.setAge(1);
        super.setLegs(4);
        System.out.println("宠物自白：我叫"+super.getName()+",是只"+super.getColor()+"的小狗，今年"+super.getAge()+"岁"+"有"+super.getLegs()+"条腿，现在"+lookHome());
    }

    public static void main(String[] args) {
        Dog dog = new Dog();
        dog.action();
    }
}
